import Vue from 'vue'
import Storage from 'vue-ls'

Vue.use(Storage)

const TokenKey = 'shelfToken'

export function getToken() {
  return Vue.ls.get(TokenKey)
}

export function setToken(token) {
  return Vue.ls.set(TokenKey, token)
}

export function removeToken() {
  return Vue.ls.remove(TokenKey)
}

export function setStorage(name, value) {
  return Vue.ls.set(name, value)
}

export function getStorage(name) {
  return Vue.ls.get(name)
}

export function removeStorage(name) {
  return Vue.ls.set(name)
}
